{	Problem: http://codeforces.ru/problemset/problem/37/A
	Verdict: Accepted

}
var n,count:int64; i,k,max:longint; a:array[1..1001] of longint;
begin
readln(n);
count:=0;
max:=0;
fillchar(a,sizeof(a),0);
for i:=1 to n do begin
    read(k);
    inc(a[k]);
    if a[k]=1 then inc(count);
    if a[k]>max then max:=a[k];
end;
writeln(max,' ',count);
end.